package com.nlelpct.manage.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 国际电话区号表
 * @TableName sys_phone_area_code
 */
@TableName(value ="sys_phone_area_code")
@Data
public class SysPhoneAreaCode implements Serializable {
    /**
     * 主键自增id
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 国家名称中文
     */
    private String areaNameZh;

    /**
     * 区号
     */
    private String areaCode;

    /**
     * 所在大洲
     */
    private String continent;

    /**
     * 国家名称英文
     */
    private String areaNameEs;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysPhoneAreaCode other = (SysPhoneAreaCode) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getAreaNameZh() == null ? other.getAreaNameZh() == null : this.getAreaNameZh().equals(other.getAreaNameZh()))
            && (this.getAreaCode() == null ? other.getAreaCode() == null : this.getAreaCode().equals(other.getAreaCode()))
            && (this.getContinent() == null ? other.getContinent() == null : this.getContinent().equals(other.getContinent()))
            && (this.getAreaNameEs() == null ? other.getAreaNameEs() == null : this.getAreaNameEs().equals(other.getAreaNameEs()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getAreaNameZh() == null) ? 0 : getAreaNameZh().hashCode());
        result = prime * result + ((getAreaCode() == null) ? 0 : getAreaCode().hashCode());
        result = prime * result + ((getContinent() == null) ? 0 : getContinent().hashCode());
        result = prime * result + ((getAreaNameEs() == null) ? 0 : getAreaNameEs().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", areaNameZh=").append(areaNameZh);
        sb.append(", areaCode=").append(areaCode);
        sb.append(", continent=").append(continent);
        sb.append(", areaNameEs=").append(areaNameEs);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}